<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta charset="UTF-8">

<link href="${pageContext.request.contextPath}/jquery/bootstrap_3.3.0/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="${pageContext.request.contextPath}/jquery/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/jquery-1.11.1-min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/bootstrap_3.3.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/bootstrap-datetimepicker-master/locale/bootstrap-datetimepicker.zh-CN.js"></script>
<!--  PAGINATION plugin -->
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/jquery/bs_pagination-master/css/jquery.bs_pagination.min.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/bs_pagination-master/js/jquery.bs_pagination.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/bs_pagination-master/localization/en.js"></script>
<%--typeachead plugin--%>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/bs_typeahead/bootstrap3-typeahead.min.js"></script>
<script type="text/javascript">

	$(function(){
		//自动补全客户名称
		$(".typeahead").typeahead({
			source:function (jquery,process){
				$.ajax({
					url:"${pageContext.request.contextPath}/tran/getCustomerNameByName",
					data:{
						name:jquery
					},
					type:"post",
					dataType:"json",
					success:function (data){
						process(data);
					}
				});
			}
		});
		//向下弹出日历
		$(".mydatedown").datetimepicker({
			language:"zh-CN",
			format:"yyyy-mm-dd",
			autoclose:1,
			minView:"month",
			initialDate:new Date(),
			todayBtn:true,
			clearBtn:true//需要手动在插件内汉化
		});
		//向上弹出日历
		$(".mydatetop").datetimepicker({
			language:"zh-CN",
			format:"yyyy-mm-dd",
			autoclose:1,
			minView:"month",
			initialDate:new Date(),
			todayBtn:true,
			clearBtn:true,//需要手动在插件内汉化
			pickerPosition:"top-right"
		});
		//定制字段
		$("#definedColumns > li").click(function(e) {
			//防止下拉菜单消失
	        e.stopPropagation();
	    });
		//页面加载时展现数据
		getContactspages(1,5);
		//手动查询
		$("#selectContactsBtn").click(function (){
			getContactspages(1,$("#demo_pag1").bs_pagination("getOption","rowsPerPage"));
		});
		//弹出创建联系人窗口
		$("#createContactsBtn").click(function (){
			$("#createContactsForm")[0].reset();
			$("#createContactsModal").modal("show");
		});
		//创建联系人
		$("#saveContactsBtn").click(function (){
			var owner = $("#create-owner").val();
			var fullname = $.trim($("#create-fullname").val());
			var source = $("#create-source").val();
			var appellation = $("#create-appellation").val();
			var job = $("#create-job").val();
			var mphone = $.trim($("#create-mphone").val());
			var email = $.trim($("#create-email").val());
			var customerId = $.trim($("#create-customerName").val());
			var description = $("#create-description").val();
			var contactSummary = $("#create-contactSummary").val();
			var nextContactTime = $("#create-nextContactTime").val();
			var address = $("#create-address").val();
			if(owner==""){
				alert("所有者不能为空！");
				return;
			}
			if(fullname==""){
				alert("姓名不能为空！");
				return;
			}
			var mphone_regx=/^1[3456789]\d{9}$/;
			if(!mphone_regx.test(mphone)){
				alert("手机格式不正确！");
				return;
			}
			var email_regx=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
			if(!email_regx.test(email)){
				alert("邮箱格式不正确！");
				return;
			}
			if (customerId==""){
				alert("客户名称不能为空！");
				return;
			}
			$.ajax({
				url:"${pageContext.request.contextPath}/contacts/insertOneContactsByContacts",
				data:{
					owner           : owner          ,
				    fullname        : fullname       ,
				    source          : source         ,
				    appellation     : appellation    ,
				    job             : job            ,
				    mphone          : mphone         ,
				    email           : email          ,
				    customerId      : customerId     ,
				    description     : description    ,
				    contactSummary  : contactSummary ,
				    nextContactTime : nextContactTime,
				    address         : address
				},
				type:"post",
				dataType:"json",
				success:function (data){
					if (data.errorCode=="1"){
						getContactspages(1,$("#demo_pag1").bs_pagination("getOption","rowsPerPage"));
						$("#createContactsModal").modal("hide");
					}else{
						alert(data.errorMessage);
					}
				}
			});
		});
		//勾选标题勾选框后，使列表所有勾选框状态一致
		$("#checkAll").click(function (){
			$("#contactList input[type='checkbox']").prop("checked",this.checked);
		});
		//勾选列表后使标题勾选框状态一致
		$("#contactList").on("click","input[type='checkbox']",function (){
			if($("#contactList input[type='checkbox']:checked").size()==$("#contactList input[type='checkbox']").size()){
				$("#checkAll").prop("checked",true);
			}else{
				$("#checkAll").prop("checked",false);
			}
		});
		//修改联系人时显示联系人数据
		$("#updateContactsBtn").click(function (){
			var contactsChecked = $("#contactList input[type='checkbox']:checked");
			if (contactsChecked.size()==0){
				alert("请勾选你要修改的联系人！");
				return;
			}
			if (contactsChecked.size()>1){
				alert("每次只能修改一次！");
				return;
			}
			var id = contactsChecked.val();
			$.ajax({
				url:"${pageContext.request.contextPath}/contacts/getOneContactsById",
				data:{
					id:id
				},
				type:"post",
				dataType:"json",
				success:function (data){
					if (data.errorInfo.errorCode=="1"){
						var contacts = data.contacts;
						$("#edit-owner").val(contacts.owner);
						$("#edit-fullname").val(contacts.fullname);
						$("#edit-source").val(contacts.source);
						$("#edit-appellation").val(contacts.appellation);
						$("#edit-job").val(contacts.job);
						$("#edit-mphone").val(contacts.mphone);
						$("#edit-email").val(contacts.email);
						$("#edit-customerName").val(contacts.customerId);
						$("#edit-contactSummary").val(contacts.contactSummary);
						$("#edit-nextContactTime").val(contacts.nextContactTime);
						$("#edit-address").val(contacts.address);
						$("#edit-description").val(contacts.description);
						$("#editContactsModal").modal("show");
					}else{
						alert(data.errorInfo.errorMessage);
					}
				}
			});
		});
		//修改联系人数据
		$("#updateContactsBtnInModal").click(function (){
			var contactsChecked = $("#contactList input[type='checkbox']:checked");
			var id = contactsChecked.val();
			var owner = $("#edit-owner").val();
			var fullname = $("#edit-fullname").val();
			var source = $("#edit-source").val();
			var appellation = $("#edit-appellation").val();
			var job = $("#edit-job").val();
			var mphone = $("#edit-mphone").val();
			var email = $("#edit-email").val();
			var customerId = $.trim($("#edit-customerName").val());
			var contactSummary = $("#edit-contactSummary").val();
			var nextContactTime = $("#edit-nextContactTime").val();
			var address = $("#edit-address").val();
			var description = $("#edit-description").val();
			if(owner==""){
				alert("所有者不能为空！");
				return;
			}
			if(fullname==""){
				alert("姓名不能为空！");
				return;
			}
			var mphone_regx=/^1[3456789]\d{9}$/;
			if(!mphone_regx.test(mphone)){
				alert("手机格式不正确！");
				return;
			}
			var email_regx=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
			if(!email_regx.test(email)){
				alert("邮箱格式不正确！");
				return;
			}
			if (customerId==""){
				alert("客户名称不能为空！");
				return;
			}
			$.ajax({
				url:"${pageContext.request.contextPath}/contacts/updateOneContactsByContact",
				data:{
					id:id,
					owner           : owner          ,
					fullname        : fullname       ,
					source          : source         ,
					appellation     : appellation    ,
					job             : job            ,
					mphone          : mphone         ,
					email           : email          ,
					customerId      : customerId     ,
					contactSummary  : contactSummary ,
					nextContactTime : nextContactTime,
					address         : address        ,
					description     : description
				},
				type:"post",
				dataType:"json",
				success:function (data){
					if (data.errorCode=="1"){
						$("#editContactsModal").modal("hide");
						getContactspages($("#demo_pag1").bs_pagination("getOption","currentPage"),$("#demo_pag1").bs_pagination("getOption","rowsPerPage"));
					}else{
						alert(data.errorMessage);
					}
				}
			});
		});
		//删除联系人数据
		$("#deleteContactsBtn").click(function (){
			var contactsChecked = $("#contactList input[type='checkbox']:checked");
			if (contactsChecked.size()==0){
				alert("请勾选你要删除的联系人！");
				return;
			}
			if (contactsChecked.size()>1){
				alert("每次只能删除一个！");
				return;
			}
			var id = contactsChecked.val();
			if(window.confirm("你确定要删除该联系人吗？")){
				$.ajax({
					url:"${pageContext.request.contextPath}/contacts/deleteOneContactsById",
					data:{
						id:id
					},
					type:"post",
					dataType:"json",
					success:function (data){
						if(data.errorCode=="1"){
							alert("删除成功！");
							getContactspages(1,$("#demo_pag1").bs_pagination("getOption","rowsPerPage"));
						}else{
							alert(data.errorMessage);
						}
					}
				});
			}
		});
	});
	function getContactspages(currentPage,pageSize){
		var owner = $("#owner").val();
		var fullname = $("#fullname").val();
		var customerName = $("#customerName").val();
		var source = $("#source").val();
		var lis="";
		$.ajax({
			url:"${pageContext.request.contextPath}/contacts/getContactsPages",
			data:{
				currentPage:currentPage,
				pageSize:pageSize,
				owner:owner,
				fullname:fullname,
				customerName:customerName,
				source:source
			},
			type:"post",
			dataType:"json",
			success:function (data){
				$.each(data.contactsList,function (index,value){
					lis+="<tr>";
					lis+="<td><input value=\""+value.id+"\" type=\"checkbox\" /></td>";
					lis+="<td><a style=\"text-decoration: none; cursor: pointer;\" onclick=\"window.location.href='${pageContext.request.contextPath}/contacts/getContactsDetail?contactsId="+value.id+"';\">"+value.fullname+"</a></td>";
					lis+="<td>"+value.customerId+"</td>";
					lis+="<td>"+value.owner+"</td>";
					lis+="<td>"+value.source+"</td>";
					lis+="</tr>";
				});
				$("#contactList").html(lis);
				$("#checkAll").prop("checked",false);
				var totalPages=1;
				var number = parseInt(data.totalCount%pageSize);
				if(number==0){
					totalPages=data.totalCount/pageSize;
				}else{
					totalPages=parseInt(data.totalCount/pageSize)+1;
				}
				$("#demo_pag1").bs_pagination({
					rowsPerPage: pageSize,
					currentPage:currentPage,
					totalPages: totalPages,
					visiblePageLinks: 5,
					onChangePage:function (event,obj){
						getContactspages(obj.currentPage,obj.rowsPerPage);
					}
				});
			}
		});
	}
</script>
</head>
<body>

	
	<!-- 创建联系人的模态窗口 -->
	<div class="modal fade" id="createContactsModal" role="dialog">
		<div class="modal-dialog" role="document" style="width: 85%;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" onclick="$('#createContactsModal').modal('hide');">
						<span aria-hidden="true">×</span>
					</button>
					<h4 class="modal-title" id="myModalLabelx">创建联系人</h4>
				</div>
				<div class="modal-body">
					<form id="createContactsForm" class="form-horizontal" role="form">
					
						<div class="form-group">
							<label for="create-owner" class="col-sm-2 control-label">所有者<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="create-owner">
									<c:forEach items="${userList}" var="user">
										<option value="${user.id}">${user.name}</option>
									</c:forEach>
								</select>
							</div>
							<label for="create-source" class="col-sm-2 control-label">来源</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="create-source">
								  <option></option>
									<c:forEach items="${sourceList}" var="source">
										<option value="${source.id}">${source.value}</option>
									</c:forEach>
								</select>
							</div>
						</div>
						
						<div class="form-group">
							<label for="create-fullname" class="col-sm-2 control-label">姓名<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-fullname">
							</div>
							<label for="create-appellation" class="col-sm-2 control-label">称呼</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="create-appellation">
								  <option></option>
									<c:forEach items="${appellationList}" var="app">
										<option value="${app.id}">${app.value}</option>
									</c:forEach>
								</select>
							</div>
							
						</div>
						
						<div class="form-group">
							<label for="create-job" class="col-sm-2 control-label">职位</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-job">
							</div>
							<label for="create-mphone" class="col-sm-2 control-label">手机</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-mphone">
							</div>
						</div>

						<div class="form-group">
							<label for="create-email" class="col-sm-2 control-label">邮箱</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-email">
							</div>
							<%--							<label for="edit-birth" class="col-sm-2 control-label">生日</label>--%>
							<%--							<div class="col-sm-10" style="width: 300px;">--%>
							<%--								<input type="text" class="form-control" id="edit-birth">--%>
							<%--							</div>--%>
							<div class="form-group">
								<label for="create-customerName" class="col-sm-2 control-label">客户名称</label>
								<div class="col-sm-10" style="width: 300px;">
									<input type="text" class="form-control typeahead" id="create-customerName" placeholder="支持自动补全">
								</div>
							</div>
						</div>

						<div class="form-group" style="position: relative;">
							<label for="create-description" class="col-sm-2 control-label">描述</label>
							<div class="col-sm-10" style="width: 81%;">
								<textarea class="form-control" rows="3" id="create-description"></textarea>
							</div>
						</div>
						
						<div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative;"></div>
						
						<div style="position: relative;top: 15px;">
							<div class="form-group">
								<label for="create-contactSummary" class="col-sm-2 control-label">联系纪要</label>
								<div class="col-sm-10" style="width: 81%;">
									<textarea class="form-control" rows="3" id="create-contactSummary"></textarea>
								</div>
							</div>
							<div class="form-group">
								<label for="create-nextContactTime" class="col-sm-2 control-label">下次联系时间</label>
								<div class="col-sm-10" style="width: 300px;">
									<input type="text" class="form-control mydatetop" id="create-nextContactTime" readonly>
								</div>
							</div>
						</div>

                        <div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative; top : 10px;"></div>

                        <div style="position: relative;top: 20px;">
                            <div class="form-group">
                                <label for="create-address" class="col-sm-2 control-label">详细地址</label>
                                <div class="col-sm-10" style="width: 81%;">
                                    <textarea class="form-control" rows="1" id="create-address"></textarea>
                                </div>
                            </div>
                        </div>
					</form>
					
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" id="saveContactsBtn">保存</button>
				</div>
			</div>
		</div>
	</div>
	
	<!-- 修改联系人的模态窗口 -->
	<div class="modal fade" id="editContactsModal" role="dialog">
		<div class="modal-dialog" role="document" style="width: 85%;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span>
					</button>
					<h4 class="modal-title" id="myModalLabel1">修改联系人</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" role="form">
					
						<div class="form-group">
							<label for="edit-owner" class="col-sm-2 control-label">所有者<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="edit-owner">
									<c:forEach items="${userList}" var="user">
										<option value="${user.id}">${user.name}</option>
									</c:forEach>
								</select>
							</div>
							<label for="edit-source" class="col-sm-2 control-label">来源</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="edit-source">
								  <option></option>
									<c:forEach items="${sourceList}" var="source">
										<option value="${source.id}">${source.value}</option>
									</c:forEach>
								</select>
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-fullname" class="col-sm-2 control-label">姓名<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-fullname">
							</div>
							<label for="edit-appellation" class="col-sm-2 control-label">称呼</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="edit-appellation">
								  <option></option>
									<c:forEach items="${appellationList}" var="app">
										<option value="${app.id}">${app.value}</option>
									</c:forEach>
								</select>
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-job" class="col-sm-2 control-label">职位</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-job">
							</div>
							<label for="edit-mphone" class="col-sm-2 control-label">手机</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-mphone" >
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-email" class="col-sm-2 control-label">邮箱</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-email">
							</div>
<%--							<label for="edit-birth" class="col-sm-2 control-label">生日</label>--%>
<%--							<div class="col-sm-10" style="width: 300px;">--%>
<%--								<input type="text" class="form-control" id="edit-birth">--%>
<%--							</div>--%>
							<div class="form-group">
								<label for="edit-customerName" class="col-sm-2 control-label">客户名称</label>
								<div class="col-sm-10" style="width: 300px;">
									<input type="text" class="form-control typeahead" id="edit-customerName" placeholder="支持自动补全">
								</div>
							</div>
						</div>

						<div class="form-group">
							<label for="edit-description" class="col-sm-2 control-label">描述</label>
							<div class="col-sm-10" style="width: 81%;">
								<textarea class="form-control" rows="3" id="edit-description"></textarea>
							</div>
						</div>
						
						<div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative;"></div>
						
						<div style="position: relative;top: 15px;">
							<div class="form-group">
								<label for="edit-contactSummary" class="col-sm-2 control-label">联系纪要</label>
								<div class="col-sm-10" style="width: 81%;">
									<textarea class="form-control" rows="3" id="edit-contactSummary"></textarea>
								</div>
							</div>
							<div class="form-group">
								<label for="edit-nextContactTime" class="col-sm-2 control-label">下次联系时间</label>
								<div class="col-sm-10" style="width: 300px;">
									<input type="text" class="form-control mydatetop" id="edit-nextContactTime" readonly>
								</div>
							</div>
						</div>
						
						<div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative; top : 10px;"></div>

                        <div style="position: relative;top: 20px;">
                            <div class="form-group">
                                <label for="edit-address" class="col-sm-2 control-label">详细地址</label>
                                <div class="col-sm-10" style="width: 81%;">
                                    <textarea class="form-control" rows="1" id="edit-address"></textarea>
                                </div>
                            </div>
                        </div>
					</form>
					
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" id="updateContactsBtnInModal">更新</button>
				</div>
			</div>
		</div>
	</div>
	
	
	
	
	
	<div>
		<div style="position: relative; left: 10px; top: -10px;">
			<div class="page-header">
				<h3>联系人列表</h3>
			</div>
		</div>
	</div>
	
	<div style="position: relative; top: -20px; left: 0px; width: 100%; height: 100%;">
	
		<div style="width: 100%; position: absolute;top: 5px; left: 10px;">
		
			<div class="btn-toolbar" role="toolbar" style="height: 80px;">
				<form class="form-inline" role="form" style="position: relative;top: 8%; left: 5px;">
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">所有者</div>
				      <input class="form-control" type="text" id="owner">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">姓名</div>
				      <input class="form-control" type="text" id="fullname">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">客户名称</div>
				      <input class="form-control typeahead" type="text" id="customerName" placeholder="支持自动补全">
				    </div>
				  </div>

<%--				  <br>--%>
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">来源</div>
				      <select class="form-control" id="source">
						  <option></option>
						  <c:forEach items="${sourceList}" var="source">
							  <option value="${source.id}">${source.value}</option>
						  </c:forEach>
						</select>
				    </div>
				  </div>
				  
<%--				  <div class="form-group">--%>
<%--				    <div class="input-group">--%>
<%--				      <div class="input-group-addon">生日</div>--%>
<%--				      <input class="form-control" type="text">--%>
<%--				    </div>--%>
<%--				  </div>--%>
				  
				  <button type="button" class="btn btn-default" id="selectContactsBtn">查询</button>
				  
				</form>
			</div>
			<div class="btn-toolbar" role="toolbar" style="background-color: #F7F7F7; height: 50px; position: relative;top: 10px;">
				<div class="btn-group" style="position: relative; top: 18%;">
				  <button type="button" class="btn btn-primary" id="createContactsBtn"><span class="glyphicon glyphicon-plus"></span> 创建</button>
				  <button type="button" class="btn btn-default" id="updateContactsBtn"><span class="glyphicon glyphicon-pencil"></span> 修改</button>
				  <button type="button" class="btn btn-danger" id="deleteContactsBtn"><span class="glyphicon glyphicon-minus"></span> 删除</button>
				</div>
				
				
			</div>
			<div style="position: relative;top: 20px;">
				<table class="table table-hover">
					<thead>
						<tr style="color: #B3B3B3;">
							<td><input id="checkAll" type="checkbox" /></td>
							<td>姓名</td>
							<td>客户名称</td>
							<td>所有者</td>
							<td>来源</td>
						</tr>
					</thead>
					<tbody id="contactList">
<%--						<tr>--%>
<%--							<td><input type="checkbox" /></td>--%>
<%--							<td><a style="text-decoration: none; cursor: pointer;" onclick="window.location.href='detail.jsp';">李四</a></td>--%>
<%--							<td>动力节点</td>--%>
<%--							<td>zhangsan</td>--%>
<%--							<td>广告</td>--%>
<%--							<td>2000-10-10</td>--%>
<%--						</tr>--%>
<%--                        <tr class="active">--%>
<%--                            <td><input type="checkbox" /></td>--%>
<%--                            <td><a style="text-decoration: none; cursor: pointer;" onclick="window.location.href='detail.jsp';">李四</a></td>--%>
<%--                            <td>动力节点</td>--%>
<%--                            <td>zhangsan</td>--%>
<%--                            <td>广告</td>--%>
<%--                            <td>2000-10-10</td>--%>
<%--                        </tr>--%>
					</tbody>
				</table>
				<div id="demo_pag1"></div>
			</div>
			
<%--			<div style="height: 50px; position: relative;top: 10px;">--%>
<%--				<div>--%>
<%--					<button type="button" class="btn btn-default" style="cursor: default;">共<b>50</b>条记录</button>--%>
<%--				</div>--%>
<%--				<div class="btn-group" style="position: relative;top: -34px; left: 110px;">--%>
<%--					<button type="button" class="btn btn-default" style="cursor: default;">显示</button>--%>
<%--					<div class="btn-group">--%>
<%--						<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">--%>
<%--							10--%>
<%--							<span class="caret"></span>--%>
<%--						</button>--%>
<%--						<ul class="dropdown-menu" role="menu">--%>
<%--							<li><a href="#">20</a></li>--%>
<%--							<li><a href="#">30</a></li>--%>
<%--						</ul>--%>
<%--					</div>--%>
<%--					<button type="button" class="btn btn-default" style="cursor: default;">条/页</button>--%>
<%--				</div>--%>
<%--				<div style="position: relative;top: -88px; left: 285px;">--%>
<%--					<nav>--%>
<%--						<ul class="pagination">--%>
<%--							<li class="disabled"><a href="#">首页</a></li>--%>
<%--							<li class="disabled"><a href="#">上一页</a></li>--%>
<%--							<li class="active"><a href="#">1</a></li>--%>
<%--							<li><a href="#">2</a></li>--%>
<%--							<li><a href="#">3</a></li>--%>
<%--							<li><a href="#">4</a></li>--%>
<%--							<li><a href="#">5</a></li>--%>
<%--							<li><a href="#">下一页</a></li>--%>
<%--							<li class="disabled"><a href="#">末页</a></li>--%>
<%--						</ul>--%>
<%--					</nav>--%>
<%--				</div>--%>
<%--			</div>--%>
			
		</div>
		
	</div>
</body>
</html>